{% extends 'base.html' %}
{% load blog_extras %}
{% block titleBlock %}
{{ post.title }}-详情页
{% endblock %}

{% block bodyBlock %}
    <div class="content-body">
        <div class="container">
            <div class="row">
                <main class="col-md-8">
                    <article class="post post-1">
                        <header class="entry-header">
                            <h1 class="entry-title">{{ post.title }}</h1>
                            <div class="entry-meta">
                                <span class="post-category"><a href="#">{{ post.category }}</a></span>
                                <span class="post-date"><a href="#"><time class="entry-date"
                                                                          datetime="{{ post.created_time }}">{{ post.created_time }}</time></a></span>
                                <span class="post-author"><a href="#">{{ post.author }}</a></span>
                                <span class="comments-link"><a href="#comment-area">{{ post.comment_set.count }} 评论</a></span>
                                <span class="views-count"><a href="{{ post.get_absolute_url }}">{{ post.views }} 阅读</a></span>
                            </div>
                        </header>
                        <div class="entry-content clearfix">
                            {{ post.body_html | safe }}
                        </div>
                    </article>
                    <section class="comment-area" id="comment-area">
                        <hr>
                        <h3>发表评论</h3>
                        {% show_comment_form post %}

                        <div class="comment-list-panel">
                            {% show_comments post %}
                        </div>
                    </section>
                </main>
                <aside class="col-md-4">
                        {% if post.toc %}
                            <div class="widget widget-content">
                                <h3 class="widget-title">文章目录</h3>
                                <div class="toc">
                                    <ul>
                                        {{ post.toc|safe }}
                                    </ul>
                                </div>
                            </div>
                        {% endif %}

                    {% show_recent_posts %}
                    {% show_archives %}
                    {% show_categories %}
                    {% show_tags %}

                    <div class="rss">
                        <a href="{% url 'rss' %}"><span class="ion-social-rss-outline"></span> RSS 订阅</a>
                    </div>
                </aside>
            </div>
        </div>
    </div>
{% endblock %}


